package cn.dbqn.controller;

import cn.dbqn.entity.Fodderenter;
import cn.dbqn.entity.Fodderout;
import cn.dbqn.service.FodderoutService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class FodderoutController {
    @Resource
    FodderoutService fodderoutService;

    @RequestMapping("/fodderout")
    public String rc(Model model){
        List<Fodderout> list=fodderoutService.findAllck();
        model.addAttribute("list",list);
        return "lyear_js_sliders";
    }

    @ResponseBody
    @RequestMapping("slckxx")
    public Object slckxx(@RequestParam("foutno")Integer foutno){
        Fodderout slckxx=fodderoutService.slckxx(foutno);
        return slckxx;
    }
}
